package cn.mw.cmdb.entity;

import cn.mw.cmdb.service.ServiceChoose;
import cn.mw.cmdb.service.impl.CustomClassificationServiceImpl;
import cn.mw.cmdb.view.TreeViewObject;
import cn.mw.components.mongodb.anno.AutoId;
import cn.mw.components.mongodb.anno.CMDBProperty;
import cn.mw.components.mongodb.entity.SearchParam;
import cn.mw.microMonitorCommon.api.cmdb.TreeView;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

@Data
@Document("mw_cmdbmd_custom_classification")
public class CustomClassificationVo extends SearchParam implements ServiceChoose, TreeView {

    @Schema(description = "分类id")
    @AutoId
    @CMDBProperty(searchType = PropertyTypeString.ID, searchPrefix = "_")
    private String id;

    @Schema(description = "分类名称")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String name;

    @Schema(description = "数据范围")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private List<TreeViewObject> treeViewList;

    @CMDBProperty
    @Schema(description = "分类属性")
    private List<CustomClassificationPropertyInfo> propertyInfoList;

    private int count;

    private String itemAssetsStatus;

    private List<String> childStatus;

    @Override
    public String getServiceId() {
        return CustomClassificationServiceImpl.ID;
    }

    @Override
    public Object getParentId() {
        return null;
    }

    @Override
    public String getItemName() {
        return getName();
    }

    @Override
    public String getType() {
        return null;
    }

    @Override
    public String getViewType() {
        return null;
    }

    @Override
    public String getItemAssetsStatus() {
        return null;
    }

    @Override
    public void setItemAssetsStatus(String itemAssetsStatus) {

    }

    @Override
    public List<String> getChildStatus() {
        return null;
    }

    @Override
    public void setChildStatus(List<String> status) {

    }
}
